package itanty.aop3;

import com.itanty.exception.UserExistException;
import com.itanty.exception.UserNotExistException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @date 2025/9/23
 */
public class Test {
    public static void main(String[] args) throws UserNotExistException {
        ApplicationContext ac = new ClassPathXmlApplicationContext("aop03.xml");
        UserService userService = (UserService) ac.getBean("userService");
        userService.login("admin","123456");
        System.out.println("***************************");
        try {
            userService.register("admin","123456","13812345678","江苏-南京");
        } catch (UserExistException e) {
        }
    }
}
